<!DOCTYPE html>
<html>
<head>
    <title>{$site_name}-会员中心-会员信息</title>
    <meta name="keywords" content="{$site_seo_keywords}" />
    <meta name="description" content="{$site_seo_description}">

    <style type="text/css">
        #two-con{
            width: 700px;
        }

        #two-con .control-label {
            float: left;
            width: 90px;
            padding-top: 5px;
            text-align: right;
        }
        #two-con input.span4{
            width: 200px;
        }
        #two-con select{
            height: 34px;
            line-height: 34px;
        }
        #two-con select.span4{
            width: 214px;
        }
        /*tips*/
        #two-con .help-inline {
            display: block;
            margin-bottom: -20px;
            *zoom: 1;
            font-size: 14px;
        }
        #two-con .controls {
            *display: inline-block;
            *padding-left: 20px;
            margin-left: 120px;
            *margin-left: 0
        }
    </style>
    <tc_include file="Public:head" />

</head>


<body class="body-white" id="top">
<tc_include file="Public:nav" />

<div class="container tc-main">
    <div class="row">
        <div class="span2">
            <tc_include file="Public:usernav"/>
        </div>
        <div class="span10">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#">会员详情</a></li>
                <if condition="$userinfo['status'] eq 1"> <li><a href="{:leuu('User/Integral/changecardnum', array('cardnum' => $userinfo['cardnum']))}">更换卡号</a></li></if>
                <li><a href="{:leuu('User/Integral/integralhis', array('cardnum' => $userinfo['cardnum']))}">消费历史</a></li>
            </ul>
            <form class="form-horizontal" id="dd" action="{:leuu('User/Integral/edit')}">
                <div id="two-con">
                    <div style="float: left;">
                        <div class="control-group">
                            <label class="control-label" for="cardnum"><span style="color: red;">*</span>会员卡号:</label>
                            <div class="controls">
                                <input type="hidden" name="cardnum" value="{$userinfo.cardnum}">
                                <input type="text" id="cardnum" disabled name="cardnum2" value="{$userinfo.cardnum}" class="span4">
                                <span class="help-inline"></span>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="name">姓名:</label>
                            <div class="controls">
                                <input type="text" id="name" name="name" value="{$userinfo['name']}" class="span4" style="width: 120px;float: left;">
                                <select name="sex" id="sex" style="width: 70px;float: right;">
                                    <option value="1" <if condition="1 eq $userinfo['sex']">selected='selected'</if> >先生</option>
                                    <option value="2" <if condition="2 eq $userinfo['sex']">selected='selected'</if> >女士</option>
                                </select>
                                <span class="help-inline"></span>
                                <div style="clear: both;"></div>
                            </div>
                        </div>
                    </div>
              <div style="float: right;">
                        <div class="control-group">
                            <label class="control-label" for="tel">手机号码:</label>
                            <div class="controls">
                                <input type="text" id="tel" name="tel" value="{$userinfo['tel']}" class="span4">
                                <span class="help-inline"></span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="shenfenzheng">身份证号:</label>
                            <div class="controls">
                                <input type="text" id="shenfenzheng" value="{$userinfo['shenfenzheng']}" name="shenfenzheng" class="span4">
                                <span class="help-inline"></span>
                            </div>
                        </div>
              </div>

                <div style="clear: both;"></div>

                <div class="control-group">
                    <label class="control-label" for="integral">积分余额:</label>
                    <div class="controls">
                        <input type="text" id="integral" disabled name="integral" value="{$userinfo['integral']/100}" style="width: 570px;">
                        <span class="help-inline"></span>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="remark">备注:</label>
                    <div class="controls">
                        <textarea  id="remark" name="remark"  style="width: 570px;height: 80px">{$userinfo['remark']}</textarea>
                        <span class="help-inline"></span>
                    </div>
                </div>



                <if condition="$userinfo['status'] eq 1">
                    <div class="control-group" style="margin-top: 50px;">
                        <label class="control-label" for=""></label>
                        <div class="controls">
                            <button class="btn btn-primary js-ajax-submit span4" type="button" style="margin-left: 0px" id="subbtn">保存</button>
                        </div>
                    </div>
                </if>


            </form>
        </div>



    </div>
    <tc_include file="Public:footer" />
</div>
<!-- /container -->
<tc_include file="Public:scripts" />

<script type="text/javascript">
    $('#subbtn').click(function() {
        $.post("{:leuu('User/Integral/edituser')}",$('#dd').serialize(),function(data) {
            document.getElementById('subbtn').disabled=true;
            if(data.status == 1) {
                if(data.url) {
                    window.location.href=data.url;
                } else {
                    location.reload();
                }
            } else {
                alert(data.info);
                document.getElementById('subbtn').disabled=false;
            }
        })
    });

</script>
</body>
</html>